package dao.impl;

import com.google.common.collect.ImmutableMap;
import dao.BalanceDao;
import domain.Balance;
import org.springframework.stereotype.Repository;

/**
 * Created by aceyin on 15/7/13.
 */
@Repository
public class BalanceDaoImpl extends BaseGenericDao<Balance, Long> implements BalanceDao {
    @Override
    public void updateCash(long user, int amount) {
        ImmutableMap<String, Object> params = newMapBuilder().put("user", user).put("amount", amount).build();
        update("update-user-cash", params);
    }
}
